MODSIGN: Import certificates from UEFI Secure Boot
authorJosh Boyer <jwboyer@fedoraproject.org>
Fri, 5 May 2017 07:21:59 +0000 (08:21 +0100)
committerBen Hutchings <ben@decadent.org.uk>
Wed, 15 May 2019 22:07:16 +0000 (23:07 +0100)
commit042bed4280b274db9719b370c589b4651b0d5e43
tree4933e7a53caff22f30ad7ec01d2ee0a47b84e337
parent89f71d31fe858203e58c3768bb61fddb3036e860
MODSIGN: Import certificates from UEFI Secure Boot

Secure Boot stores a list of allowed certificates in the 'db' variable.
This imports those certificates into the system trusted keyring.  This
allows for a third party signing certificate to be used in conjunction
with signed modules.  By importing the public certificate into the 'db'
variable, a user can allow a module signed with that certificate to
load.  The shim UEFI bootloader has a similar certificate list stored
in the 'MokListRT' variable.  We import those as well.

Secure Boot also maintains a list of disallowed certificates in the 'dbx'
variable.  We load those certificates into the newly introduced system
blacklist keyring and forbid any module signed with those from loading and
forbid the use within the kernel of any key with a matching hash.

This facility is enabled by setting CONFIG_LOAD_UEFI_KEYS.

Signed-off-by: Josh Boyer <jwboyer@fedoraproject.org>
Signed-off-by: David Howells <dhowells@redhat.com>
Gbp-Pq: Topic features/all/db-mok-keyring
Gbp-Pq: Name 0004-MODSIGN-Import-certificates-from-UEFI-Secure-Boot.patch
certs/Kconfig
certs/Makefile
certs/load_uefi.c [new file with mode: 0644]